import { Key } from "react";

export type Status = 0 | 1;
export interface IhospitalListParams {
  page: number;
  limit: number;
  hosname?: string;
  hoscode?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
  status?: Status;
}

export interface IhospitalListResItem {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: 0;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: Status;
  bookingRule: {
    cycle: number;
    releaseTime: string;
    stopTime: string;
    quitDay: number;
    quitTime: string;
    rule: string[];
  };
}

export type IhospitalList = IhospitalListResItem[];

export interface IhospitalListResponse {
  totalElements: number;
  content: IhospitalList;
}

// 单个省市区数据
export interface ProvinceItem {
  id: number;
  name: string;
  value: string;
}

export type ProvinceList = ProvinceItem[];

export interface Ibr {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: string[];
}

export interface Ihospital {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: 0 | 1;
  bookingRule: null;
}
export interface IhospitalDetailResponse {
  bookingRule: Ibr;
  hospital: Ihospital;
}

export interface Idep {
  depcode: string;
  depname: Key;
  disabled?: boolean;
  children: IdepList;
}
export type IdepList = Idep[];

export interface status {
  code: number;
  message: string;
  data: null;
  ok: boolean;
}

export interface IscheduleRuleParams {
  page: number;
  limit: number;
  hoscode: string;
  depcode: Key;
}

export interface IscheduleRuleResponse {
  total: number;
  bookingScheduleList:IbookScheduleList;
  baseMap: { hosname: string };
}

export interface IbookScheduleItem {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}

export type IbookScheduleList = IbookScheduleItem[];


export interface IScheduleItem {
  id: string
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    dayOfWeek: string
    depname: string
    hosname: string
  }
  hoscode: string
  depcode: string
  title: string
  docname: string
  skill: string
  workDate: string
  workTime: number
  reservedNumber: number
  availableNumber: number
  amount: number
  status: number
  hosScheduleId: string
}

export type IScheduleList = IScheduleItem[]